package com.fit.entities.homeworkRecords;

import java.util.Date;

import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.tapestry5.beaneditor.NonVisual;

import com.fit.entities.course.Course;
import com.fit.entities.homework.Homework;
import com.fit.entities.user.User;

@Entity
@Table(name = "homeworkRecords")

public class HomeworkRecords {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@NonVisual
	@Column(name = "homeworkRecords_id")
	private Long homeworkRecordsId;

	
	
	@ManyToOne(optional = false)
	@JoinColumn(name = "id")
	private User user;
	@ManyToOne(optional = false)
	@JoinColumn(name = "homework_id")
	private Homework homework;

	

	@Column(name = "points")
	private int points;

	




	public Long getHomeworkRecordsId() {
		return homeworkRecordsId;
	}


	public void setHomeworkRecordsId(Long homeworkRecordsId) {
		this.homeworkRecordsId = homeworkRecordsId;
	}


	public User getUser() {
		return user;
	}


	public void setUser(User user) {
		this.user = user;
	}


	public Homework getHomework() {
		return homework;
	}


	public void setHomework(Homework homework) {
		this.homework = homework;
	}


	public int getPoints() {
		return points;
	}


	public void setPoints(int points) {
		this.points = points;
	}


	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		HomeworkRecords that = (HomeworkRecords) o;


		return true;
	}

}
